	import com.rattkin.event.ConfigEvent;
	import com.rattkin.event.RemoteErrorEvent;
	import com.rattkin.service.handler.ConfigHandler;
	
	private function processXML(xml:XML):void { 
		var configHandler:ConfigHandler = new ConfigHandler();	
				
		var parsedAmfUrl:String = configHandler.parse(xml);
		var isValid:Boolean = configHandler.validate(parsedAmfUrl);	
				
		if (isValid) {
			this.getDispatcher().dispatchEvent(new ConfigEvent(ConfigEvent.PROCESSED, parsedAmfUrl));
		}
		else {
			this.getDispatcher().dispatchEvent(new RemoteErrorEvent(RemoteErrorEvent.ERROR, "AMF channel not configured or configuration XML malformed!"));	
		}		
	}

